package cn.topevery.garden.entity.po;

import cn.topevery.garden.framework.base.BaseEntity;
import com.alibaba.fastjson.annotation.JSONField;
import hw.topevery.framework.annotation.DbTable;
import hw.topevery.framework.annotation.DbTableField;
import hw.topevery.framework.enums.DbTypeEnum;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author code-generate
 * @date 2022-01-07
 */
@Data
@DbTable(tableName = "t_clock_in")
public class ClockIn extends BaseEntity {

    @DbTableField(columnName = "c_entity_id", dbType = DbTypeEnum.VARCHAR)
    private String entityId;
    @DbTableField(columnName = "c_user_id", dbType = DbTypeEnum.VARCHAR)
    private String userId;
    /**
     * 打卡人
     */
    @DbTableField(columnName = "c_name", dbType = DbTypeEnum.VARCHAR)
    public String name;

    /**
     * 备注
     */
    @DbTableField(columnName = "c_desc", dbType = DbTypeEnum.VARCHAR)
    public String desc;

    /**
     * 打卡地点
     */
    @DbTableField(columnName = "c_address", dbType = DbTypeEnum.VARCHAR)
    public String address;

    /**
     * 打卡时间
     */
    @DbTableField(columnName = "c_date", dbType = DbTypeEnum.TIMESTAMP)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    public LocalDateTime date;

    /**
     * x坐标
     */
    @DbTableField(columnName = "c_lng", dbType = DbTypeEnum.DOUBLE)
    public Double lng;

    /**
     * y坐标
     */
    @DbTableField(columnName = "c_lat", dbType = DbTypeEnum.DOUBLE)
    public Double lat;

    /**
     * 部门
     */
    @DbTableField(columnName = "c_company_name", dbType = DbTypeEnum.VARCHAR)
    public String companyName;

    @DbTableField(columnName = "c_company_id", dbType = DbTypeEnum.VARCHAR)
    public String companyId;

    @DbTableField(columnName = "c_is_range", dbType = DbTypeEnum.INTEGER)
    public Integer isRange;

    @DbTableField(columnName = "c_is_valid", dbType = DbTypeEnum.INTEGER)
    public Integer isValid;

    @DbTableField(columnName = "c_is_use", dbType = DbTypeEnum.INTEGER)
    public Integer isUse;

    @DbTableField(columnName = "c_section_name", dbType = DbTypeEnum.VARCHAR)
    public String sectionName;

    @DbTableField(columnName = "c_section_id", dbType = DbTypeEnum.VARCHAR)
    public String sectionId;

    @DbTableField(columnName = "c_type", dbType = DbTypeEnum.INTEGER)
    public Integer type;

    @DbTableField(columnName = "c_overtimes", dbType = DbTypeEnum.BIGINT)
    public Long overtimes;
}